home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / PGUIDE / BIBLIO / BIBLIO.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-16  |  32.6 KB  |  976 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "ComDlg32.OCX"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H00FFFF80&
  5.    Caption         =   "Bibliography Database Browser"
  6.    ClientHeight    =   6840
  7.    ClientLeft      =   3000
  8.    ClientTop       =   3285
  9.    ClientWidth     =   9000
  10.    LinkTopic       =   "Form1"
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   6840
  13.    ScaleWidth      =   9000
  14.    StartUpPosition =   2  'CenterScreen
  15.    WhatsThisHelp   =   -1  'True
  16.    Begin VB.PictureBox DisplayGroup 
  17.       BackColor       =   &H00C0C0C0&
  18.       Height          =   5295
  19.       Index           =   2
  20.       Left            =   720
  21.       ScaleHeight     =   5235
  22.       ScaleWidth      =   7995
  23.       TabIndex        =   0
  24.       Top             =   1200
  25.       Width           =   8055
  26.       Begin VB.ListBox lstPubsTitles 
  27.          Height          =   1260
  28.          Left            =   3120
  29.          TabIndex        =   45
  30.          Top             =   2880
  31.          Width           =   4575
  32.       End
  33.       Begin VB.TextBox txtPubs 
  34.          DataField       =   "Comments"
  35.          DataSource      =   "dbCtrl(2)"
  36.          Height          =   975
  37.          Index           =   9
  38.          Left            =   360
  39.          MultiLine       =   -1  'True
  40.          ScrollBars      =   2  'Vertical
  41.          TabIndex        =   10
  42.          Top             =   3480
  43.          Width           =   2415
  44.       End
  45.       Begin VB.TextBox txtPubs 
  46.          DataField       =   "Fax"
  47.          DataSource      =   "dbCtrl(2)"
  48.          Height          =   285
  49.          Index           =   8
  50.          Left            =   1680
  51.          TabIndex        =   9
  52.          Text            =   "Fax"
  53.          Top             =   2880
  54.          Width           =   1095
  55.       End
  56.       Begin VB.TextBox txtPubs 
  57.          DataField       =   "Telephone"
  58.          DataSource      =   "dbCtrl(2)"
  59.          Height          =   285
  60.          Index           =   7
  61.          Left            =   360
  62.          TabIndex        =   8
  63.          Text            =   "Telephone"
  64.          Top             =   2880
  65.          Width           =   1095
  66.       End
  67.       Begin VB.TextBox txtPubs 
  68.          DataField       =   "Zip"
  69.          DataSource      =   "dbCtrl(2)"
  70.          Height          =   285
  71.          Index           =   6
  72.          Left            =   6120
  73.          TabIndex        =   7
  74.          Text            =   "Zip"
  75.          Top             =   2280
  76.          Width           =   1575
  77.       End
  78.       Begin VB.TextBox txtPubs 
  79.          DataField       =   "State"
  80.          DataSource      =   "dbCtrl(2)"
  81.          Height          =   285
  82.          Index           =   5
  83.          Left            =   5040
  84.          TabIndex        =   6
  85.          Text            =   "State"
  86.          Top             =   2280
  87.          Width           =   855
  88.       End
  89.       Begin VB.TextBox txtPubs 
  90.          DataField       =   "City"
  91.          DataSource      =   "dbCtrl(2)"
  92.          Height          =   285
  93.          Index           =   4
  94.          Left            =   360
  95.          TabIndex        =   5
  96.          Text            =   "City"
  97.          Top             =   2280
  98.          Width           =   4455
  99.       End
  100.       Begin VB.TextBox txtPubs 
  101.          DataField       =   "Company Name"
  102.          DataSource      =   "dbCtrl(2)"
  103.          Height          =   285
  104.          Index           =   2
  105.          Left            =   360
  106.          TabIndex        =   3
  107.          Text            =   "Company Name"
  108.          Top             =   1080
  109.          Width           =   7335
  110.       End
  111.       Begin VB.TextBox txtPubs 
  112.          DataField       =   "Name"
  113.          DataSource      =   "dbCtrl(2)"
  114.          Height          =   285
  115.          Index           =   1
  116.          Left            =   2280
  117.          TabIndex        =   2
  118.          Text            =   "Name"
  119.          Top             =   480
  120.          Width           =   5415
  121.       End
  122.       Begin VB.TextBox txtPubs 
  123.          DataField       =   "PubID"
  124.          DataSource      =   "dbCtrl(2)"
  125.          Height          =   285
  126.          Index           =   0
  127.          Left            =   360
  128.          TabIndex        =   1
  129.          Text            =   "Name"
  130.          Top             =   480
  131.          Width           =   1455
  132.       End
  133.       Begin VB.Data dbCtrl 
  134.          BackColor       =   &H00FFFF00&
  135.          Caption         =   "  Publishers"
  136.          Connect         =   "Access"
  137.          DatabaseName    =   "C:\VB5\BIBLIO.MDB"
  138.          DefaultCursorType=   0  'DefaultCursor
  139.          DefaultType     =   2  'UseODBC
  140.          Exclusive       =   0   'False
  141.          Height          =   375
  142.          Index           =   2
  143.          Left            =   3000
  144.          Options         =   0
  145.          ReadOnly        =   -1  'True
  146.          RecordsetType   =   1  'Dynaset
  147.          RecordSource    =   "Publishers"
  148.          Top             =   4800
  149.          Width           =   2175
  150.       End
  151.       Begin VB.TextBox txtPubs 
  152.          DataField       =   "Address"
  153.          DataSource      =   "dbCtrl(2)"
  154.          Height          =   285
  155.          Index           =   3
  156.          Left            =   360
  157.          TabIndex        =   4
  158.          Text            =   "Address"
  159.          Top             =   1680
  160.          Width           =   7335
  161.       End
  162.       Begin VB.Label lblPubs 
  163.          BackColor       =   &H00C0C0C0&
  164.          Caption         =   "Titles Published"
  165.          ForeColor       =   &H00000000&
  166.          Height          =   255
  167.          Index           =   10
  168.          Left            =   3120
  169.          TabIndex        =   44
  170.          Top             =   2640
  171.          Width           =   1215
  172.       End
  173.       Begin VB.Label lblPubs 
  174.          BackColor       =   &H00C0C0C0&
  175.          Caption         =   "Comments"
  176.          ForeColor       =   &H00FF0000&
  177.          Height          =   255
  178.          Index           =   9
  179.          Left            =   360
  180.          TabIndex        =   43
  181.          Top             =   3240
  182.          Width           =   735
  183.       End
  184.       Begin VB.Label lblPubs 
  185.          BackColor       =   &H00C0C0C0&
  186.          Caption         =   "Fax"
  187.          ForeColor       =   &H00FF0000&
  188.          Height          =   255
  189.          Index           =   8
  190.          Left            =   1680
  191.          TabIndex        =   42
  192.          Top             =   2640
  193.          Width           =   735
  194.       End
  195.       Begin VB.Label lblPubs 
  196.          BackColor       =   &H00C0C0C0&
  197.          Caption         =   "Telephone"
  198.          ForeColor       =   &H00FF0000&
  199.          Height          =   255
  200.          Index           =   7
  201.          Left            =   360
  202.          TabIndex        =   41
  203.          Top             =   2640
  204.          Width           =   855
  205.       End
  206.       Begin VB.Label lblPubs 
  207.          BackColor       =   &H00C0C0C0&
  208.          Caption         =   "Zip"
  209.          ForeColor       =   &H00FF0000&
  210.          Height          =   255
  211.          Index           =   6
  212.          Left            =   6120
  213.          TabIndex        =   40
  214.          Top             =   2040
  215.          Width           =   735
  216.       End
  217.       Begin VB.Label lblPubs 
  218.          BackColor       =   &H00C0C0C0&
  219.          Caption         =   "State"
  220.          ForeColor       =   &H00FF0000&
  221.          Height          =   255
  222.          Index           =   5
  223.          Left            =   5040
  224.          TabIndex        =   39
  225.          Top             =   2040
  226.          Width           =   735
  227.       End
  228.       Begin VB.Label lblPubs 
  229.          BackColor       =   &H00C0C0C0&
  230.          Caption         =   "City"
  231.          ForeColor       =   &H00FF0000&
  232.          Height          =   255
  233.          Index           =   4
  234.          Left            =   360
  235.          TabIndex        =   38
  236.          Top             =   2040
  237.          Width           =   495
  238.       End
  239.       Begin VB.Label lblPubs 
  240.          BackColor       =   &H00C0C0C0&
  241.          Caption         =   "Address"
  242.          ForeColor       =   &H00FF0000&
  243.          Height          =   255
  244.          Index           =   3
  245.          Left            =   360
  246.          TabIndex        =   37
  247.          Top             =   1440
  248.          Width           =   735
  249.       End
  250.       Begin VB.Label lblPubs 
  251.          BackColor       =   &H00C0C0C0&
  252.          Caption         =   "Company Name"
  253.          ForeColor       =   &H00FF0000&
  254.          Height          =   255
  255.          Index           =   2
  256.          Left            =   360
  257.          TabIndex        =   36
  258.          Top             =   840
  259.          Width           =   1215
  260.       End
  261.       Begin VB.Label lblPubs 
  262.          BackColor       =   &H00C0C0C0&
  263.          Caption         =   "Name"
  264.          ForeColor       =   &H00FF0000&
  265.          Height          =   255
  266.          Index           =   1
  267.          Left            =   2280
  268.          TabIndex        =   35
  269.          Top             =   240
  270.          Width           =   735
  271.       End
  272.       Begin VB.Label lblPubs 
  273.          BackColor       =   &H00C0C0C0&
  274.          Caption         =   "Publishers"
  275.          ForeColor       =   &H00FF0000&
  276.          Height          =   255
  277.          Index           =   0
  278.          Left            =   360
  279.          TabIndex        =   34
  280.          Top             =   120
  281.          Width           =   1095
  282.       End
  283.    End
  284.    Begin VB.PictureBox DisplayGroup 
  285.       BackColor       =   &H00C0C0C0&
  286.       Height          =   5295
  287.       Index           =   1
  288.       Left            =   360
  289.       ScaleHeight     =   5235
  290.       ScaleWidth      =   7995
  291.       TabIndex        =   11
  292.       Top             =   840
  293.       Width           =   8055
  294.       Begin VB.ListBox lstAuthorTitles 
  295.          Height          =   870
  296.          Left            =   2880
  297.          TabIndex        =   53
  298.          Top             =   1320
  299.          Width           =   4455
  300.       End
  301.       Begin VB.TextBox txtAuthors 
  302.          DataField       =   "Year Born"
  303.          DataSource      =   "dbCtrl(1)"
  304.          Height          =   375
  305.          Index           =   2
  306.          Left            =   360
  307.          TabIndex        =   49
  308.          Text            =   "Year Born"
  309.          Top             =   2040
  310.          Width           =   1815
  311.       End
  312.       Begin VB.TextBox txtAuthors 
  313.          DataField       =   "Au_ID"
  314.          DataSource      =   "dbCtrl(1)"
  315.          Height          =   375
  316.          Index           =   1
  317.          Left            =   360
  318.          TabIndex        =   48
  319.          Text            =   "Au_ID"
  320.          Top             =   1320
  321.          Width           =   1815
  322.       End
  323.       Begin VB.TextBox txtAuthors 
  324.          DataField       =   "Author"
  325.          DataSource      =   "dbCtrl(1)"
  326.          Height          =   375
  327.          Index           =   0
  328.          Left            =   360
  329.          TabIndex        =   12
  330.          Text            =   "Author"
  331.          Top             =   600
  332.          Width           =   6975
  333.       End
  334.       Begin VB.Data dbCtrl 
  335.          BackColor       =   &H00FFFF00&
  336.          Caption         =   "    Authors"
  337.          Connect         =   "Access"
  338.          DatabaseName    =   "C:\VB5\BIBLIO.MDB"
  339.          DefaultCursorType=   0  'DefaultCursor
  340.          DefaultType     =   2  'UseODBC
  341.          Exclusive       =   0   'False
  342.          Height          =   375
  343.          Index           =   1
  344.          Left            =   3000
  345.          Options         =   0
  346.          ReadOnly        =   -1  'True
  347.          RecordsetType   =   1  'Dynaset
  348.          RecordSource    =   "Authors"
  349.          Top             =   4800
  350.          Width           =   2175
  351.       End
  352.       Begin VB.Label lblAuthors 
  353.          BackColor       =   &H00C0C0C0&
  354.          Caption         =   "Titles Written"
  355.          ForeColor       =   &H00000000&
  356.          Height          =   255
  357.          Index           =   3
  358.          Left            =   2880
  359.          TabIndex        =   52
  360.          Top             =   1080
  361.          Width           =   1095
  362.       End
  363.       Begin VB.Label lblAuthors 
  364.          BackColor       =   &H00C0C0C0&
  365.          Caption         =   "Year Born"
  366.          ForeColor       =   &H00FF0000&
  367.          Height          =   255
  368.          Index           =   2
  369.          Left            =   360
  370.          TabIndex        =   51
  371.          Top             =   1800
  372.          Width           =   855
  373.       End
  374.       Begin VB.Label lblAuthors 
  375.          BackColor       =   &H00C0C0C0&
  376.          Caption         =   "Au_ID"
  377.          ForeColor       =   &H00FF0000&
  378.          Height          =   255
  379.          Index           =   1
  380.          Left            =   360
  381.          TabIndex        =   50
  382.          Top             =   1080
  383.          Width           =   735
  384.       End
  385.       Begin VB.Label lblAuthors 
  386.          BackColor       =   &H00C0C0C0&
  387.          Caption         =   "Authors"
  388.          ForeColor       =   &H00FF0000&
  389.          Height          =   255
  390.          Index           =   0
  391.          Left            =   360
  392.          TabIndex        =   47
  393.          Top             =   120
  394.          Width           =   735
  395.       End
  396.    End
  397.    Begin VB.Data dcAuthorTitles 
  398.       Caption         =   "Data1"
  399.       Connect         =   "Access"
  400.       DatabaseName    =   "C:\VB5\BIBLIO.MDB"
  401.       DefaultCursorType=   0  'DefaultCursor
  402.       DefaultType     =   2  'UseODBC
  403.       Exclusive       =   0   'False
  404.       Height          =   270
  405.       Left            =   0
  406.       Options         =   0
  407.       ReadOnly        =   0   'False
  408.       RecordsetType   =   2  'Snapshot
  409.       RecordSource    =   ""
  410.       Top             =   5880
  411.       Visible         =   0   'False
  412.       Width           =   1215
  413.    End
  414.    Begin VB.Data dcTitleAuthors 
  415.       Caption         =   "Data1"
  416.       Connect         =   "Access"
  417.       DatabaseName    =   "C:\VB5\BIBLIO.MDB"
  418.       DefaultCursorType=   0  'DefaultCursor
  419.       DefaultType     =   2  'UseODBC
  420.       Exclusive       =   0   'False
  421.       Height          =   270
  422.       Left            =   0
  423.       Options         =   0
  424.       ReadOnly        =   -1  'True
  425.       RecordsetType   =   2  'Snapshot
  426.       RecordSource    =   ""
  427.       Top             =   6120
  428.       Visible         =   0   'False
  429.       Width           =   1215
  430.    End
  431.    Begin VB.Data dcPubsTitles 
  432.       Caption         =   "Data1"
  433.       Connect         =   "Access"
  434.       DatabaseName    =   "C:\VB5\BIBLIO.MDB"
  435.       DefaultCursorType=   0  'DefaultCursor
  436.       DefaultType     =   2  'UseODBC
  437.       Exclusive       =   0   'False
  438.       Height          =   270
  439.       Left            =   0
  440.       Options         =   0
  441.       ReadOnly        =   -1  'True
  442.       RecordsetType   =   2  'Snapshot
  443.       RecordSource    =   ""
  444.       Top             =   6360
  445.       Visible         =   0   'False
  446.       Width           =   1215
  447.    End
  448.    Begin VB.PictureBox Picture1 
  449.       Height          =   495
  450.       Left            =   0
  451.       ScaleHeight     =   435
  452.       ScaleWidth      =   9075
  453.       TabIndex        =   13
  454.       Top             =   0
  455.       Width           =   9135
  456.       Begin VB.CommandButton btnGroup 
  457.          Caption         =   "Publishers"
  458.          Height          =   495
  459.          Index           =   2
  460.          Left            =   6120
  461.          TabIndex        =   16
  462.          Top             =   0
  463.          Width           =   3015
  464.       End
  465.       Begin VB.CommandButton btnGroup 
  466.          Caption         =   "Authors"
  467.          Height          =   495
  468.          Index           =   1
  469.          Left            =   3000
  470.          TabIndex        =   15
  471.          Top             =   0
  472.          Width           =   3135
  473.       End
  474.       Begin VB.CommandButton btnGroup 
  475.          Caption         =   "Titles"
  476.          Height          =   495
  477.          Index           =   0
  478.          Left            =   0
  479.          TabIndex        =   14
  480.          Top             =   0
  481.          Width           =   3015
  482.       End
  483.    End
  484.    Begin MSComDlg.CommonDialog CommonDialog1 
  485.       Left            =   8640
  486.       Top             =   720
  487.       _ExtentX        =   847
  488.       _ExtentY        =   847
  489.       FilterIndex     =   639
  490.       FontSize        =   1.73857e-39
  491.       HelpCommand     =   3
  492.       HelpFile        =   "BIBLIO.HLP"
  493.    End
  494.    Begin VB.PictureBox DisplayGroup 
  495.       BackColor       =   &H00C0C0C0&
  496.       Height          =   5295
  497.       Index           =   0
  498.       Left            =   0
  499.       ScaleHeight     =   5235
  500.       ScaleWidth      =   7995
  501.       TabIndex        =   17
  502.       Top             =   480
  503.       Width           =   8055
  504.       Begin VB.TextBox txtTitles 
  505.          BackColor       =   &H00FFFFFF&
  506.          DataField       =   "PubID"
  507.          DataSource      =   "dbCtrl(0)"
  508.          Height          =   285
  509.          Index           =   6
  510.          Left            =   240
  511.          TabIndex        =   24
  512.          Text            =   "PubID"
  513.          Top             =   3720
  514.          Width           =   1215
  515.       End
  516.       Begin VB.TextBox txtTitles 
  517.          BackColor       =   &H00FFFFFF&
  518.          DataField       =   "Comments"
  519.          DataSource      =   "dbCtrl(0)"
  520.          Height          =   1095
  521.          Index           =   5
  522.          Left            =   4080
  523.          MultiLine       =   -1  'True
  524.          ScrollBars      =   2  'Vertical
  525.          TabIndex        =   23
  526.          Top             =   2280
  527.          Width           =   3375
  528.       End
  529.       Begin VB.TextBox txtTitles 
  530.          BackColor       =   &H00FFFFFF&
  531.          DataField       =   "Subject"
  532.          DataSource      =   "dbCtrl(0)"
  533.          Height          =   1095
  534.          Index           =   4
  535.          Left            =   240
  536.          MultiLine       =   -1  'True
  537.          TabIndex        =   22
  538.          Top             =   2280
  539.          Width           =   3495
  540.       End
  541.       Begin VB.TextBox txtTitles 
  542.          BackColor       =   &H00FFFFFF&
  543.          DataField       =   "Description"
  544.          DataSource      =   "dbCtrl(0)"
  545.          Height          =   285
  546.          Index           =   3
  547.          Left            =   240
  548.          TabIndex        =   21
  549.          Text            =   "Description"
  550.          Top             =   1680
  551.          Width           =   3495
  552.       End
  553.       Begin VB.TextBox txtTitles 
  554.          BackColor       =   &H00FFFFFF&
  555.          DataField       =   "ISBN"
  556.          DataSource      =   "dbCtrl(0)"
  557.          Height          =   285
  558.          Index           =   2
  559.          Left            =   1200
  560.          TabIndex        =   20
  561.          Text            =   "ISBN"
  562.          Top             =   1080
  563.          Width           =   2535
  564.       End
  565.       Begin VB.TextBox txtTitles 
  566.          BackColor       =   &H00FFFFFF&
  567.          DataField       =   "Year Published"
  568.          DataSource      =   "dbCtrl(0)"
  569.          Height          =   285
  570.          Index           =   1
  571.          Left            =   240
  572.          TabIndex        =   19
  573.          Text            =   "Year"
  574.          Top             =   1080
  575.          Width           =   735
  576.       End
  577.       Begin VB.TextBox txtTitles 
  578.          BackColor       =   &H00FFFFFF&
  579.          DataField       =   "Title"
  580.          DataSource      =   "dbCtrl(0)"
  581.          Height          =   285
  582.          Index           =   0
  583.          Left            =   240
  584.          TabIndex        =   18
  585.          Text            =   "Title"
  586.          Top             =   480
  587.          Width           =   7215
  588.       End
  589.       Begin VB.Data dbCtrl 
  590.          BackColor       =   &H00FFFF00&
  591.          Caption         =   "      Titles"
  592.          Connect         =   "Access"
  593.          DatabaseName    =   "C:\VB5\BIBLIO.MDB"
  594.          DefaultCursorType=   0  'DefaultCursor
  595.          DefaultType     =   2  'UseODBC
  596.          Exclusive       =   0   'False
  597.          Height          =   375
  598.          Index           =   0
  599.          Left            =   2880
  600.          Options         =   0
  601.          ReadOnly        =   -1  'True
  602.          RecordsetType   =   2  'Snapshot
  603.          RecordSource    =   "Titles"
  604.          Top             =   4800
  605.          Width           =   2175
  606.       End
  607.       Begin VB.ListBox lstTitleAuthors 
  608.          BackColor       =   &H00FFFFFF&
  609.          ForeColor       =   &H00000000&
  610.          Height          =   480
  611.          Left            =   4080
  612.          TabIndex        =   46
  613.          Top             =   1080
  614.          Width           =   3375
  615.       End
  616.       Begin VB.Label lblTitlePub 
  617.          BackColor       =   &H00FFFFFF&
  618.          BorderStyle     =   1  'Fixed Single
  619.          Caption         =   "Label1"
  620.          Height          =   285
  621.          Left            =   1920
  622.          TabIndex        =   54
  623.          Top             =   3720
  624.          Width           =   5535
  625.       End
  626.       Begin VB.Label lblTitles 
  627.          BackColor       =   &H00C0C0C0&
  628.          Caption         =   "Author(s)"
  629.          ForeColor       =   &H00000000&
  630.          Height          =   255
  631.          Index           =   8
  632.          Left            =   4080
  633.          TabIndex        =   33
  634.          Top             =   840
  635.          Width           =   735
  636.       End
  637.       Begin VB.Label lblTitles 
  638.          BackColor       =   &H00C0C0C0&
  639.          Caption         =   "Publisher"
  640.          ForeColor       =   &H00000000&
  641.          Height          =   255
  642.          Index           =   7
  643.          Left            =   1920
  644.          TabIndex        =   32
  645.          Top             =   3480
  646.          Width           =   735
  647.       End
  648.       Begin VB.Label lblTitles 
  649.          BackColor       =   &H00C0C0C0&
  650.          Caption         =   "PubID"
  651.          ForeColor       =   &H00C00000&
  652.          Height          =   255
  653.          Index           =   6
  654.          Left            =   240
  655.          TabIndex        =   31
  656.          Top             =   3480
  657.          Width           =   615
  658.       End
  659.       Begin VB.Label lblTitles 
  660.          BackColor       =   &H00C0C0C0&
  661.          Caption         =   "Comments"
  662.          ForeColor       =   &H00C00000&
  663.          Height          =   255
  664.          Index           =   5
  665.          Left            =   4080
  666.          TabIndex        =   30
  667.          Top             =   2040
  668.          Width           =   855
  669.       End
  670.       Begin VB.Label lblTitles 
  671.          BackColor       =   &H00C0C0C0&
  672.          Caption         =   "Subject"
  673.          ForeColor       =   &H00C00000&
  674.          Height          =   255
  675.          Index           =   4
  676.          Left            =   240
  677.          TabIndex        =   29
  678.          Top             =   2040
  679.          Width           =   615
  680.       End
  681.       Begin VB.Label lblTitles 
  682.          BackColor       =   &H00C0C0C0&
  683.          Caption         =   "Description"
  684.          ForeColor       =   &H00C00000&
  685.          Height          =   255
  686.          Index           =   3
  687.          Left            =   240
  688.          TabIndex        =   28
  689.          Top             =   1440
  690.          Width           =   855
  691.       End
  692.       Begin VB.Label lblTitles 
  693.          BackColor       =   &H00C0C0C0&
  694.          Caption         =   "ISBN"
  695.          ForeColor       =   &H00C00000&
  696.          Height          =   255
  697.          Index           =   2
  698.          Left            =   1200
  699.          TabIndex        =   27
  700.          Top             =   840
  701.          Width           =   615
  702.       End
  703.       Begin VB.Label lblTitles 
  704.          BackColor       =   &H00C0C0C0&
  705.          Caption         =   "Year"
  706.          ForeColor       =   &H00C00000&
  707.          Height          =   255
  708.          Index           =   1
  709.          Left            =   240
  710.          TabIndex        =   26
  711.          Top             =   840
  712.          Width           =   615
  713.       End
  714.       Begin VB.Label lblTitles 
  715.          BackColor       =   &H00C0C0C0&
  716.          Caption         =   "Titles"
  717.          ForeColor       =   &H00C00000&
  718.          Height          =   255
  719.          Index           =   0
  720.          Left            =   240
  721.          TabIndex        =   25
  722.          Top             =   120
  723.          Width           =   615
  724.       End
  725.    End
  726.    Begin VB.Menu mnuFile 
  727.       Caption         =   "&File"
  728.       Begin VB.Menu mnuExit 
  729.          Caption         =   "E&xit"
  730.       End
  731.    End
  732.    Begin VB.Menu mnuSelect 
  733.       Caption         =   "&Select"
  734.       Begin VB.Menu mnuTitles 
  735.          Caption         =   "&Titles"
  736.       End
  737.       Begin VB.Menu mnuAuthors 
  738.          Caption         =   "&Authors"
  739.       End
  740.       Begin VB.Menu mnuPublishers 
  741.          Caption         =   "&Publishers"
  742.       End
  743.    End
  744.    Begin VB.Menu mnuHelp 
  745.       Caption         =   "&Help"
  746.       Begin VB.Menu mnuHelpContents 
  747.          Caption         =   "&Contents"
  748.       End
  749.       Begin VB.Menu mnuHelpAbout 
  750.          Caption         =   "&About"
  751.       End
  752.    End
  753. Attribute VB_Name = "Form1"
  754. Attribute VB_GlobalNameSpace = False
  755. Attribute VB_Creatable = False
  756. Attribute VB_PredeclaredId = True
  757. Attribute VB_Exposed = False
  758. ' Windows API declaration for invoking WinHelp.
  759. 'Constant declarations for data control & picture box arrays
  760. Const Titles% = 0
  761. Const Authors% = 1
  762. Const Publishers% = 2
  763. ' Holds the directory to Biblio.Mdb for module reference
  764. Dim sDir As String
  765. 'List all titles from a particular publisher
  766. Sub ListPubsTitles()
  767.     Dim Qry As String
  768.     'Build the query
  769.     Qry = "SELECT DISTINCTROW Titles.Title FROM Titles"
  770.     Qry = Qry + " WHERE (Titles.PubID=" + txtPubs(0).Text + ")"
  771.     'Refresh the data control
  772.     dcPubsTitles.RecordSource = Qry
  773.     dcPubsTitles.Refresh
  774.     'Clear the listbox and build the new list
  775.     lstPubsTitles.Clear
  776.     If dcPubsTitles.Recordset.EOF Then
  777.         lstPubsTitles.AddItem "No titles for this publisher."
  778.     End If
  779.     Do While Not dcPubsTitles.Recordset.EOF
  780.         lstPubsTitles.AddItem dcPubsTitles.Recordset(0)
  781.         dcPubsTitles.Recordset.MoveNext
  782.     Loop
  783. End Sub
  784. 'List all titles by a particular author
  785. Sub ListAuthorTitles()
  786.     Dim Qry As String
  787.     'Build the query
  788.     Qry = "SELECT Titles.Title FROM Titles"
  789.     Qry = Qry + " INNER JOIN [Title Author] ON"
  790.     Qry = Qry + " Titles.ISBN = [Title Author].ISBN WHERE"
  791.     Qry = Qry + " (([Title Author].Au_ID=" + txtAuthors(1).Text + "))"
  792.     'Refresh the data control
  793.     dcAuthorTitles.RecordSource = Qry
  794.     dcAuthorTitles.Refresh
  795.     'Clear the listbox and build the new list
  796.     lstAuthorTitles.Clear
  797.     Do While Not dcAuthorTitles.Recordset.EOF
  798.         lstAuthorTitles.AddItem dcAuthorTitles.Recordset(0)
  799.         dcAuthorTitles.Recordset.MoveNext
  800.     Loop
  801. End Sub
  802. 'List the authors of a particular title
  803. Sub ListTitleAuthors()
  804.     Dim Qry As String
  805.     'Build the query
  806.     Qry = "SELECT Authors.Author FROM Authors"
  807.     Qry = Qry + " INNER JOIN [Title Author] ON"
  808.     Qry = Qry + " Authors.Au_ID = [Title Author].Au_ID WHERE"
  809.     Qry = Qry + " (([Title Author].ISBN='" + txtTitles(2).Text + "'))"
  810.     'Refresh the data control
  811.     dcTitleAuthors.RecordSource = Qry
  812.     dcTitleAuthors.Refresh
  813.     'Clear the listbox and build the new list
  814.     lstTitleAuthors.Clear
  815.     Do While Not dcTitleAuthors.Recordset.EOF
  816.         lstTitleAuthors.AddItem dcTitleAuthors.Recordset(0)
  817.         dcTitleAuthors.Recordset.MoveNext
  818.     Loop
  819.     ' Get Publisher name using PubID text
  820.     Dim myDB As Database, myRS As Recordset
  821.     ' set the database to BIBLIO.MDB
  822.     Set myDB = DBEngine.Workspaces(0).OpenDatabase(sDir & "\biblio.mdb")
  823.     ' Set the recordset to Publishers table.
  824.     Set myRS = myDB.OpenRecordset("Publishers", dbOpenDynaset)
  825.     Dim myCriteria As String
  826.     myCriteria = "PubID = " & txtTitles(6).Text
  827.     myRS.FindFirst myCriteria
  828.     lblTitlePub.Caption = myRS!Name
  829. End Sub
  830. 'Bring the selected picture box to the top by clicking button
  831. Private Sub btnGroup_Click(Index As Integer)
  832.     DisplayGroup(Index).ZOrder 0
  833. End Sub
  834. 'Build the lists of related records when the current record changes
  835. Private Sub dbCtrl_Reposition(Index As Integer)
  836.     If Index = Publishers Then
  837.         ListPubsTitles
  838.     ElseIf Index = Authors Then
  839.         ListAuthorTitles
  840.     ElseIf Index = Titles Then
  841.         ListTitleAuthors
  842.     End If
  843. End Sub
  844. 'Bring the selected picture box to the top by clicking picture box
  845. Private Sub DisplayGroup_Click(Index As Integer)
  846.     DisplayGroup(Index).ZOrder 0
  847. End Sub
  848. Private Sub Form_Load()
  849.   On Error GoTo FormLoad_Err
  850.   'Set the module level string variable
  851.   sDir = CurDir
  852.   dcAuthorTitles.DatabaseName = sDir & "\biblio.mdb"
  853.   dcAuthorTitles.Refresh
  854.   dcPubsTitles.DatabaseName = sDir & "\biblio.mdb"
  855.   dcPubsTitles.Refresh
  856.   dcTitleAuthors.DatabaseName = sDir & "\biblio.mdb"
  857.   dcTitleAuthors.Refresh
  858.   dbCtrl(0).DatabaseName = sDir & "\biblio.mdb"
  859.   dbCtrl(0).Refresh
  860.   dbCtrl(1).DatabaseName = sDir & "\biblio.mdb"
  861.   dbCtrl(1).Refresh
  862.   dbCtrl(2).DatabaseName = sDir & "\biblio.mdb"
  863.   dbCtrl(2).Refresh
  864. FormLoad_Exit:
  865. Exit Sub
  866. FormLoad_Err:
  867.     'advanced error handling is required if the database cannot be
  868.     'found as error 3024 would indicate.
  869.     If Err = 3024 Then
  870.         'set CommonDialog properties before showing
  871.         With CommonDialog1
  872.           .DialogTitle = "Unable to find the biblio.mdb file location"
  873.           .Filter = "(*.mdb)|*.mdb"
  874.           .InitDir = CurDir
  875.           .filename = "biblio.mdb"
  876.           .Flags = cdlOFNReadOnly Or cdlOFNExplorer Or _
  877.            cdlOFNFileMustExist Or cdlOFNPathMustExist
  878.           .ShowOpen
  879.           'make sure the filename is not an empty string
  880.           If .filename <> "" Then
  881.             'make sure that the database file returned is indeed biblio.mdb
  882.             If Right(UCase(.filename), Len("\biblio.mdb")) = "\BIBLIO.MDB" Then
  883.             dcAuthorTitles.DatabaseName = .filename
  884.             'set the global sDir variable to the path derived from the CommonDialog Filename
  885.             sDir = Mid(.filename, 1, Len(.filename) - Len("\biblio.mdb"))
  886.             End If
  887.             Resume
  888.           Else
  889.             Unload Me
  890.           End If
  891.         End With
  892.     ElseIf Err <> 0 Then ' another error
  893.         MsgBox "Unexpected Error: " & Err.Description
  894.         End
  895.     End If
  896.       
  897.     Resume FormLoad_Exit
  898. End Sub
  899. 'Move to the selected Publisher when clicked in the Titles form
  900. Private Sub lblTitlePub_Click()
  901.     Dim BM As Variant, FindStr As String
  902.     FindStr = "PubID = " + txtTitles(6).Text
  903.     Debug.Print FindStr
  904.     BM = dbCtrl(Publishers).Recordset.Bookmark
  905.     dbCtrl(Publishers).Recordset.FindFirst FindStr
  906.      If dbCtrl(Publishers).Recordset.NoMatch = True Then
  907.         dbCtrl(Publishers).Recordset.Bookmark = BM
  908.     Else
  909.         DisplayGroup_Click (Publishers)
  910.     End If
  911. End Sub
  912. 'Move to the selected title when clicked in the Author's form
  913. Private Sub lstAuthorTitles_Click()
  914.     Dim BM As Variant, FindStr As String
  915.     FindStr = "Title = """ + lstAuthorTitles.List(lstAuthorTitles.ListIndex) + """"
  916.     BM = dbCtrl(Titles).Recordset.Bookmark
  917.     dbCtrl(Titles).Recordset.FindFirst FindStr
  918.     If dbCtrl(Titles).Recordset.NoMatch = True Then
  919.         dbCtrl(Titles).Recordset.Bookmark = BM
  920.     Else
  921.         DisplayGroup_Click (Titles)
  922.     End If
  923. End Sub
  924. 'Move to the selected title when clicked in the Publisher's form
  925. Private Sub lstPubsTitles_Click()
  926.     Dim BM As Variant
  927.     BM = dbCtrl(Titles).Recordset.Bookmark
  928.     dbCtrl(Titles).Recordset.FindFirst _
  929.         "Title = """ + lstPubsTitles.List(lstPubsTitles.ListIndex) + """"
  930.     If dbCtrl(Titles).Recordset.NoMatch = True Then
  931.         dbCtrl(Titles).Recordset.Bookmark = BM
  932.     Else
  933.         DisplayGroup_Click (Titles)
  934.     End If
  935. End Sub
  936. 'Move to the selected Author when clicked in the Titles form
  937. Private Sub lstTitleAuthors_Click()
  938.     Dim BM As Variant
  939.     BM = dbCtrl(Authors).Recordset.Bookmark
  940.     dbCtrl(Authors).Recordset.FindFirst _
  941.         "Author = """ + lstTitleAuthors.List(lstTitleAuthors.ListIndex) + """"
  942.     If dbCtrl(Authors).Recordset.NoMatch = True Then
  943.         dbCtrl(Authors).Recordset.Bookmark = BM
  944.     Else
  945.         DisplayGroup_Click (Authors)
  946.     End If
  947. End Sub
  948. 'Bring the Author's picture box to the top
  949. Private Sub mnuAuthors_Click()
  950.     DisplayGroup_Click (Authors)
  951. End Sub
  952. 'Bring the Publishers picture box to the top
  953. Private Sub mnuPublishers_Click()
  954.     DisplayGroup_Click (Publishers)
  955. End Sub
  956. 'Bring the Titles picture box to the top
  957. Private Sub mnuTitles_Click()
  958.     DisplayGroup_Click (Titles)
  959. End Sub
  960. 'End the program
  961. Private Sub mnuExit_Click()
  962.     Unload Me
  963. End Sub
  964. 'Display the About box
  965. Private Sub mnuHelpAbout_Click()
  966.     frmAbout.Show 1
  967. End Sub
  968. 'Open Help and display the Contents screen
  969. Private Sub mnuHelpContents_Click()
  970.   With CommonDialog1
  971.     .HelpCommand = cdlHelpContents
  972.     .HelpFile = "C:\vb\samples\datactrl\biblio.hlp"
  973.     .ShowHelp
  974.     End With
  975. End Sub
  976.